if [ -n "$__CURRENT_HG_BRANCH" ]; then
	local s="["
	s+="$__CURRENT_HG_BRANCH"
	case "$__CURRENT_HG_BRANCH_STATUS" in
		ahead)
		s+="↑"
		;;
		diverged)
		s+="↕"
		;;
		behind)
		s+="↓"
		;;
	esac
	if [ -n "$__CURRENT_HG_BRANCH_IS_DIRTY" ]; then
		s+="⚡"
	fi
	s+="]"

	printf " %s%s" "%{${fg[yellow]}%}" $s
fi
